#ifndef GPIO_H
#define	GPIO_H

#include <p32xxxx.h>
#include <GenericTypeDefs.h>
#include <array>
#include "Enumerations.h"
#include "Pin.h"

class Gpio
{
public:
	// Creates a new Gpio for the given port
	Gpio(Enums::Gpio::Ports port);

	// Default Destructor
	virtual ~Gpio();

	// Gets the requested pin from the port
	Pin GetPin(Enums::Gpio::Pins::Number number);

	// Retuns an array of all pins
	std::array<Pin, Enums::Gpio::Pins::PinCountPerPort > GetPins();

private:
	// Port for this instance
	Enums::Gpio::Ports Port;

	// Array of pins for this instance
	std::array<Pin, Enums::Gpio::Pins::PinCountPerPort > Pins;
};

#endif	/* GPIO_H */